/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package GUI;

import java.awt.Color;
import javax.swing.JTabbedPane;


/**
* Classe Onglet colore l'onglet de conversation lorsqu'un message est reçu
* @author       Bill 
* @author      Frank Djomo
 * @author      Christelle SIAGO HAPPI
 * @author      djomopoueme@gmail.com
 * @author      christelle.siagohappi@gmail.com
*/
public class colorOnglet extends Thread {

    private JTabbedPane panelOnglet;
    private boolean isConneted;
    
    public colorOnglet(JTabbedPane panelOnglet) {
        this.panelOnglet = panelOnglet;
        isConneted=true;    
    }

    @Override
    public void run() {
      while (isConneted) {
          panelOnglet.setBackgroundAt(panelOnglet.getSelectedIndex(), Color.BLUE);
      }

    }
    public void stopActivity(){
      isConneted=false;
    }
    public void startActivity(){
      new Thread(this).start();
    }
    
}
